<template>
  <!--旅游攻略首页布局-->
  <div>
    <section class="container">
      <!-- 左边 侧边栏 + 推荐城市 -->
      <div class="post-left">
        <div>
          <PostAside />
        </div>
        <div class="aside-content">
          <h3>推荐城市</h3>
          <img src="@/assets/pic_sea.jpeg" alt="" />
        </div>
      </div>

      <!-- 右边 搜索框+标题+攻略详情页-->
      <div class="post-right">
        <!-- Search搜索框 + 推荐跳转的城市-->
        <div class="search-form">
          <SearchForms />
        </div>

        <!-- 推荐攻略标题 + 写游记按钮 -->
        <div class="post-title">
          <h3>推荐攻略</h3>
          <div class="btn">
            <el-button type="primary" class="el-icon-edit" @click="handleSubmit"
              >写游记</el-button
            >
          </div>
        </div>

        <!-- 攻略详情显示页面 -->
        <div class="post-details">
          <PostDetail />
        </div>
      </div>
    </section>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    handleSubmit() {
      this.$router.push("/post/issue");
    },
  },
};
</script>

<style lang="less" scoped>
.container {
  display: flex;
  justify-content: space-between;
  width: 1000px;
  margin: 0 auto;
}
.post-left {
  width: 260px;
  height: fit-content;
  // background-color: pink;
  margin-top: 10px;
  .aside-content {
    margin-top: 10px;
    width: 260px;
    height: 220px;
    h3 {
      line-height: 36px;
      font-weight: normal;
      font-size: 16px;
      border-bottom: 1px solid #ccc;
    }
    img {
      width: 100%;
      height: 172px;
      margin-top: 10px;
    }
  }
}
.post-right {
  margin-top: 10px;
  width: 700px;
  //   background: skyblue;
  .search-form {
    width: 700px;
    background-color: #fff;
  }
}

.post-title {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  .btn {
    height: 45px;
  }
  h3 {
    font-size: 18px;
    font-weight: 400;
    color: #ffa500;
    border-bottom: 2px solid #ffa500;
  }
}
</style>